package org.jeecg.modules.basic.unit.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 计量单位
 * @Author: jeecg-boot
 * @Date:   2023-07-26
 * @Version: V1.0
 */
@Data
@TableName("wms_basic_unit")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="wms_basic_unit对象", description="计量单位")
public class BasicUnit implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**名称*/
    @Excel(name = "名称", width = 15)
    @ApiModelProperty(value = "名称")
    private String name;
	/**编码*/
    @Excel(name = "编码", width = 15)
    @ApiModelProperty(value = "编码")
    private String code;
	/**状态*/
    @Excel(name = "状态", width = 15, dicCode = "is_open")
    @Dict(dicCode = "is_open")
    @ApiModelProperty(value = "状态")
    private String status;
	/**描述*/
    @ApiModelProperty(value = "描述")
    private String description;
	/**数量*/
    @ApiModelProperty(value = "数量")
    private String number;
	/**换算单位id*/
    @ApiModelProperty(value = "换算单位id")
    private String unitId;
	/**删除状态(0-正常,1-已删除)*/
    @ApiModelProperty(value = "删除状态(0-正常,1-已删除)")
    @TableLogic
    private Integer delFlag;
	/**租户id*/
    @ApiModelProperty(value = "租户id")
    private Integer tenantId;
    /**
     * 父id
     */
    @Excel(name = "上级计量单位", width = 15, dictTable = "wms_basic_unit", dicText = "name", dicCode = "id")
    @Dict(dictTable = "wms_basic_unit", dicText = "name", dicCode = "id")
    private String pid;
    /**
     * 是否使用
     */
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否使用")
    private Integer used;
    /**
     * 状态字典值
     */
    @TableField(exist = false)
    private String status_dictText;
    /**
     * 类型（1:单位分类  2:单位）
     */
    @ApiModelProperty(value = "类型")
    private Integer type;
}
